home *** CD-ROM | disk | FTP | other *** search
- #ifndef __FABCURSORBALLOON__
- #define __FABCURSORBALLOON__
-
- /* this also distinguishes a normal window from a window with objects */
-
- enum windowclasses {
- kFabWindowClass = 10
- };
-
- /* this is my window record, containing
- the procedures normally called when handling events (if you do not want to
- undertake special actions i.e. for dragging, pass nil), the number of
- objects, and a Handle to the objects */
-
- typedef struct RgnBalloonCurs RgnBalloonCurs;
- typedef RgnBalloonCurs *RgnBalloonCursPtr;
- typedef RgnBalloonCursPtr *RgnBalloonCursHandle;
-
- struct FabWindowRec {
- void (*activateProc)(EventRecord *, DialogRef, Handle cntlList, short defItem, Boolean);
- void (*updateProc)(WindowRef, short defItem);
- void (*dragProc)(WindowRef);
- void (*growProc)(WindowRef, EventRecord *);
- void (*zoomProc)(WindowRef, short);
- void (*goAwayProc)(WindowRef);
- void (*contentProc)(WindowRef, EventRecord *);
- void (*getDragHiliteRectProc)(WindowRef, RectPtr);
- Boolean (*canIAcceptDrag)(const HFSFlavor *);
- OSErr (*dragReaction)(WindowRef, const HFSFlavor *);
- unsigned long objCount;
- DragTrackingHandlerUPP trackUPP;
- DragReceiveHandlerUPP recUPP;
- RgnBalloonCursHandle myZones;
- Handle cntlList;
- short defItem;
- Boolean currentlyShowingProgressCurs;
- };
-
- typedef struct FabWindowRec FabWindowRec;
- typedef FabWindowRec *FabWindowPtr;
-
- /* this is a generic object belonging to a window */
-
- struct RgnBalloonCurs {
- void (*recalcRgnProc)(DialogRef, RgnBalloonCursPtr);
- RgnHandle zoneLocal;
- RgnHandle zoneGlobal;
- CursHandle curs;
- unsigned long myBalloon;
- short balloonVariant;
- short itemID;
- };
-
- #pragma internal on
- //==========================================================
-
- OSErr InstallRgnHandler(FabWindowPtr w, RgnHandle whichRgn, void (*recalcProc)(DialogRef, RgnBalloonCursPtr),
- CursHandle cursor,
- unsigned long balloon, short ballnVariant, short iID);
- void RecalcMouseRegion(DialogRef d, Point mouse);
- FabWindowPtr ResizeObjects(DialogRef w);
- void RecalcGlobalCoords(FabWindowPtr w);
- //void DisposFabWindow(FabWindowPtr w);
- void ForceMouseMovedEvent(void);
- //void InitFabWindow(FabWindowPtr w);
-
- //==========================================================
-
- extern RgnHandle mouseRgn, wideOpenRgn;
-
- //==========================================================
- #pragma internal reset
-
- /* useful macros */
-
- #define toBalloon(m, i) (((long)m << 16) + i)
-
- #define Zones(w) (w->myZones)
-
- /* macros for setting the event handlers for the window, and
- prototypes of the handlers */
-
- #define SetActivate(w, p) w->activateProc = p
- #define SetUpdate(w, p) w->updateProc = p
- #define SetDrag(w, p) w->dragProc = p
- #define SetGrow(w, p) w->growProc = p
- #define SetZoom(w, p) w->zoomProc = p
- #define SetGoAway(w, p) w->goAwayProc = p
- #define SetContent(w, p) w->contentProc = p
- #define SetGetDragRect(w, p) w->getDragHiliteRectProc = p
- #define SetCanIAcceptDrag(w, p) w->canIAcceptDrag = p
- #define SetDragReaction(w, p) w->dragReaction = p
-
- #define NumObjects(w) (w->objCount)
- #define OneMoreObject(w) (w->objCount++)
-
- //#define IsFabWindow(w) (w && (GetWindowKind(w.u.w) == kFabWindowClass || (isMovableModal(w))))
-
- #endif
-
-